package guda.mrpc.core;

import guda.mrpc.core.api.Response;

import java.util.Map;

/**
 * Created by well on 17/5/21.
 */
public class RpcResponse implements Response{

    private String requestId;
    private Throwable throwable;
    private Object result;

    private Map<String,String> attach;

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public Throwable getThrowable() {
        return throwable;
    }

    public void setThrowable(Throwable throwable) {
        this.throwable = throwable;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    public Map<String, String> getAttach() {
        return attach;
    }

    public void setAttach(Map<String, String> attach) {
        this.attach = attach;
    }

    @Override
    public String toString() {
        return "RpcResponse{" +
                "requestId='" + requestId + '\'' +
                ", throwable=" + throwable +
                ", result=" + result +
                ", attach=" + attach +
                '}';
    }
}
